package com.deprecated.patch;

import java.awt.event.FocusListener;
import java.awt.event.KeyListener;

import javax.swing.JTextField;

import com.panopset.sf.Windoc;

/**
 * Panopset text field.
 *
 * @author Karl Dinwiddie
 *
 */
public class PanTextField extends AbstractPanTextField implements
        KeyListener, FocusListener {

    /**
     * @param columns
     *            Number of columns.
     * @param borderTitle
     *            Border title.
     * @param toolTipText
     *            Tool tip text.
     */
    public PanTextField(final Windoc wd, final int columns, final String borderTitle,
            final String toolTipText) {
        this(wd, columns, borderTitle, toolTipText, "");
    }

    /**
     * @param columns
     *            Number of columns.
     * @param borderTitle
     *            Border title.
     * @param toolTipText
     *            Tool tip text.
     * @param defaultValue
     *            Default value.
     */
    public PanTextField(final Windoc wd, final int columns, final String borderTitle,
            final String toolTipText, final String defaultValue) {
        super(wd, columns, borderTitle, toolTipText, defaultValue);
    }

    @Override
    public final JTextField createComponent() {
        return new TTextField(getColumns());
    }

}
